package com.xiangyueEducation.uploaderCloud.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author nbguohao666
 * @since 2024-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("questions")
public class Questions  implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String question;

    private Long testId;

    private Integer questionNumber;

    private String options;

    private String val;
    //1表示开启，0表示不开启
    private Boolean status;


    public boolean isBlank() {
        //没有题或没有选项或选项没有价值都应该是不对的
        if (((question==null||question.isBlank())||(options==null||options.isBlank())||(val==null||val.isBlank()))&&status) {
            return true;
        } else return false;
    }
}
